<template>
	<view class="background">
		<view class="container">
			<web-view :src="webViewUrl"></web-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webViewUrl: ''
			}
		},
		onLoad(o) {
			if(JSON.parse(decodeURIComponent(o.title))){
				uni.setNavigationBarTitle({
					title:JSON.parse(decodeURIComponent(o.title))
				})
			}else{
				uni.setNavigationBarTitle({
					title:'跳转页面'
				})
			}
			this.webViewUrl = JSON.parse(decodeURIComponent(o.url));
		},
		methods: {

		}
	}
</script>

<style>
	page {
		background-color: #f6f6f6;
		height: 100%;
		width: 100%;
	}

	.background {
		padding-left: 20rpx;
		padding-right: 20rpx;
	}

	.container {
		display: flex;
		border-radius: 20rpx;
		margin-top: 20rpx;
		align-items: center;
		flex-direction: column;
	}
</style>
